import {
    request
} from "../requset/requset"
/**
 * POST 请求模板
 */
const post_demo = (data) => {
    return request("/api", "POST", {})
}
/**
 * GET 请求模板
 */
const get_demo = () => {
    return request("/api", "GET", {})
}

/**
 * 登录
 */
const Login = (data) => {
    return request("/user/autologin", "POST", {
        ...data
    })
}
/**
 * 打开冰柜
 */
const OpenDoor = (data) => {
    return request("/door/open", "POST", {}, 1, data)
}
/**
 *  获取个人信息 或者修改个人信息
 */
const getorpost_info = (data) => {
    return request("/user/profile", "POST", {
        ...data
    })
}
/**
 * 图片上传 身份证验证
 */
const updateidcard = (data) => {
    return request("/user/idcard", "POST", {

    })
}
/**
 * 设备类型
 */
const devicetype = (data) => {
    return request("/device/type", "POST", {

    })
}
/**
 * 设备状态
 */
const devicestatusList = (data) => {
    return request("/device/statusList", "POST", {})
}
/**
 * 申请设备
 */
const deviceapply = (data) => {
    return request("/device/apply", "POST", {
        ...data
    })
}
/**
 * 设备列表
 */
const devicelist = (data) => {
    return request("/device/list", "POST", {
        ...data
    })
}
/**
 * 设备详情 device/detail
 */
const devicedetail = (data) => {
    return request("/device/detail", "POST", {
        ...data
    })
}
/**
 * 商品列表 /goods
 */
const goodslist = (data) => {
    return request("/goods", "POST", {
        ...data
    })
}

/**
 * /device/addGoods 设备添加商品
 */
const addGoods = (data) => {
    return request("/device/addGoods", "POST", {
        ...data
    })
}
/**
 * 删除商品 /device/addGoods
 */
const deleteGoods = (data) => {
    return request("/device/deleteGoods", "POST", {
        ...data
    })
}
/**
 * 增减库存 /device/incDecStock
 */
const incDecStock = (data) => {
    return request("/device/incDecStock", "POST", {
        ...data
    })
}

/**
 * 修改金额 /device/changePrice
 */
const changePrice = (data) => {
    return request("/device/changePrice", "POST", {
        ...data
    })
}
/**
 *  补货开门 /device/openDoor
 */
const openDoorone = (data) => {
    return request("/device/openDoor", "POST", {
        ...data
    })
}
/**
 *   设备编辑 /device/edit
 */
const emedit = (data) => {
    return request("/device/edit", "POST", {
        ...data
    })
}
/**
 *  设备重启 /device/restart
 */
const emrestart = (data) => {
    return request("/device/restart", "POST", {
        ...data
    })
}
/**
 * 设备订单总数/order/total
 */
const emorderTotal = (data) => {
    return request("/order/total", "POST", {
        ...data
    })
}
/**
 * 设备订单列表 /order/list
 */
const emorderList = (data) => {
    return request("/order/list", "POST", {
        ...data
    })
}
/**
 * 远程锁定
 */
const emremoteLock = (data) => {
    return request("/device/remoteLock", "POST", {
        ...data
    })
}
/**
 *   设备报修 /device/repair
 */
const emrepair = (data) => {
    return request("/device/repair", "POST", {
        ...data
    })
}
/**
 *  报修记录 /device/repairList
 */
const repairList = (data) => {
    return request("/device/repairList", "POST", {
        ...data
    })
}
/**
 *  消息列表 /my/message
 */
const messageList = (data) => {
    return request("/my/message", "POST", {
        ...data
    })
}
/**
 * 消息确认 /my/msgread
 */
const msgread = (data) => {
    return request("/my/msgread", "POST", {
        ...data
    })
}
/**
 *   消息详情 /my/msgcnt
 */
const msgcnt = (data) => {
    return request("/my/msgcnt", "POST", {
        ...data
    })
}
/**
 * 我的首页 /my
 */
const mydddd = (data) => {
    return request("/my", "POST", {
        ...data
    })
}
/**
 *   我的资料 /my/profile
 */
const myprofile = (data) => {
    return request("/my/profile", "POST", {
        ...data
    })
}
/**
 * 我的商品
 */
const mygoods = (data) => {
    return request("/my/goods", "POST", {
        ...data
    })
}
/**
 * 我的商品详情
 */
const mygoodsinfo = (data) => {
    return request("/my/goodsinfo", "POST", {
        ...data
    })
}
/**
 *  在售设备 /my/goodsdevice
 */
const mygoodsdevice = (data) => {
    return request("/my/goodsdevice", "POST", {
        ...data
    })
}
/**
 * 订货商品分类  /my/goodsType
 */
const mygoodsType = (data) => {
    return request("/my/goodsType", "POST", {
        ...data
    })
}
/**
 * 商品列表 /my/goodsList
 */
const mygoodsList = (data) => {
    return request("/my/goodsList", "POST", {
        ...data
    })
}
/**
 * 地址列表   /my/addressList
 */
const myaddressList = (data) => {
    return request("/my/addressList", "POST", {
        ...data
    })
}

/**
 * 删除地址 /my/addressdelete
 */
const myaddressdelete = (data) => {
    return request("/my/addressdelete", "POST", {
        ...data
    })
}

/**
 * 
 *  编辑地址   /my/addressedit
 */
const myaddressedit = (data) => {
    return request("/my/addressedit", "POST", {
        ...data
    })
}
/**
 * 更改默认地址 /my/addressDefault
 */
const myaddressDefault = (data) => {
    return request("/my/addressDefault", "POST", {
        ...data
    })
}
/**
 * 新增地址
 */
const myaddressAdd = (data) => {
    return request("/my/addressAdd", "POST", {
        ...data
    })
}
/**提交订货 
 * /my/ordergoods
 */
const myordergoods = (data) => {
    return request("/my/ordergoods", "POST", {
        ...data
    })
}
/**
 *  订货详情 /my/orderDetail
 */
const myorderDetail = (data) => {
    return request("/my/orderDetail", "POST", {
        ...data
    })
}
/**
 *  我的订货 /my/ordergoodslist
 */
const myordergoodslist = (data) => {
    return request("/my/ordergoodslist", "POST", {
        ...data
    })
}
/**
 * 
 *   我的退货 /my/returnList
 */
const myreturnList = (data) => {
    return request("/my/returnList", "POST", {
        ...data
    })
}
/**
 *   退货详情 /my/returnDetail
 */
const myreturnDetail = (data) => {
    return request("/my/returnDetail", "POST", {
        ...data
    })
}
/**
 * 退货商品列表 /my/returnGoodsList
 */
const myreturnGoodsList = (data) => {
    return request("/my/returnGoodsList", "POST", {
        ...data
    })
}
/**
 * 申请退货 /my/returnGoods
 */
const myreturnGoods = (data) => {
    return request("/my/returnGoods", "POST", {
        ...data
    })
}
/**
 *  填写订单号 /my/returnGoodsExpress
 */
const myreturnGoodsExpress = (data) => {
    return request("/my/returnGoodsExpress", "POST", {
        ...data
    })
}
/**
 * 
 *  银行卡解绑 /user/bankcardunbind
 */
const bankcardunbind = (data) => {
    return request("/user/bankcardunbind", "POST", {
        ...data
    })
}


/**
 *  银行卡识别  /user/bankcard
 */
const userbankcard = (data) => {
    return request("/user/bankcard", "POST", {
        ...data
    })
}
/**
 *  获取银行卡信息  /user/bankcard
 */
const userbankbynum = (data) => {
    return request("/user/bankbynum", "POST", {
        ...data
    })
}
/**
 *  新增银行卡  /user/bankcardadd
 */
const userbankcardadd = (data) => {
    return request("/user/bankcardadd", "POST", {
        ...data
    })
}

/**
 *  银行卡列表 /user/bankcardlist
 */
const userbankcardlist = (data) => {
    return request("/user/bankcardlist", "POST", {
        ...data
    })
}
/**
 *  退还申请  /device/returnapply
 */
const returnapply = (data) => {
    return request("/device/returnapply", "POST", {
        ...data
    })
}
/**
 * 
 *   /user/bankcardunbind
 */
/**
 * 退还列表 /device/returnlist
 */
const returnlist = (data) => {
    return request("/device/returnlist", "POST", {
        ...data
    })
}
/**
 * 退还申请 /user/login
 */
const retuserlogin = (data) => {
    return request("/user/login", "POST", {
        ...data
    })
}
/**
 * 自动登录 /user/authorize
 */
const userauthorize = (data) => {
    return request("/user/authorize", "POST", {
        ...data
    })
}
/**
 * 退出登录 /user/logout
 */
const userlogout = (data) => {
    return request("/user/logout", "POST", {
        ...data
    })
}
/**
 * 推广页面 
 */
const promoteindex = (data) => {
    return request("/promote/index", "POST", {
        ...data
    })
}
/**
 * 注册推广
 */
const promoteregister = (data) => {
    return request("/user/register", "POST", {
        ...data
    })
}
/**
 *  我的团队 汇总   /promote/myteam
 */
const promotemyteamtotal = (data) => {
    return request("/promote/myteamtotal", "POST", {
        ...data
    })
}
/**
 *  我的团队 列表   /promote/myteam
 */
const promotemyteam = (data) => {
    return request("/promote/myteam", "POST", {
        ...data
    })
}
/**
 *  收入列表 /promote/memberincome
 */
const promotememberincome = (data) => {
    return request("/promote/memberincome", "POST", {
        ...data
    })
}
/**
 * 修改比例 /promote/memberratio
 */
const promotememberratio = (data) => {
    return request("/promote/memberratio", "POST", {
        ...data
    })
}
/**
 * 团队详情 /promote/memberdetail
 */
const promotememberdetail = (data) => {
    return request("/promote/memberdetail", "POST", {
        ...data
    })
}
/**
 *  提升代理 /promote/memberproxy
 */
const promotememberproxy = (data) => {
    return request("/promote/memberproxy", "POST", {
        ...data
    })
}
/**
 *   收益列表 incomelist
 */
const myincomelist = (data) => {
    console.log(data, '传输数据');
    return request("/my/incomelist", "POST", {
        ...data
    })
}
/**
 * 收益列表 /my/incometotal
 */
const myincometotal = (data) => {
    console.log(data, '传输数据');
    return request("/my/incometotal", "POST", {
        ...data
    })
}
export default {
    Login,
    OpenDoor,
    getorpost_info,
    updateidcard,
    devicetype,
    devicestatusList,
    deviceapply,
    devicelist,
    devicedetail,
    goodslist,
    addGoods,
    deleteGoods,
    incDecStock,
    changePrice,
    openDoorone,
    emedit,
    emrestart,
    emorderTotal,
    emorderList,
    emremoteLock,
    emrepair,
    repairList,
    messageList,
    msgread,
    msgcnt,
    mydddd,
    myprofile,
    mygoods,
    mygoodsinfo,
    mygoodsdevice,
    mygoodsType,
    mygoodsList,
    myaddressList,
    myaddressDefault,
    myaddressAdd,
    myordergoods,
    myorderDetail,
    myordergoodslist,
    myreturnList,
    myreturnDetail,
    myreturnGoodsList,
    myreturnGoods,
    myreturnGoodsExpress,
    myincomelist,
    myincometotal,
    userbankcard,
    userbankbynum,
    userbankcardadd,
    userbankcardlist,
    returnapply,
    returnlist,
    retuserlogin,
    userauthorize,
    userlogout,
    promoteindex,
    promoteregister,
    promotemyteam,
    promotemyteamtotal,
    promotememberincome,
    promotememberratio,
    promotememberdetail,
    promotememberproxy,
    bankcardunbind,
    myaddressedit,
    myaddressdelete
}